package com.adnaan.backend.service;

import com.adnaan.backend.entity.Dishes;
import com.adnaan.backend.entity.DishesSteps;
import com.adnaan.backend.entity.dto.DosageDto;
import com.adnaan.backend.entity.vo.DosageVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface DishesService extends IService<Dishes> {
    /**
     * 根据药材ID获取相关药膳列表
     */
    List<Dishes> getDishesByHerbalId(Long herbalId);

    /**
     * 获取药膳的制作步骤
     */
    List<DishesSteps> getStepsByDishId(Long dishId);

    /**
     * 获取药膳所需的药材材料
     */
    List<DosageDto> getMaterialsByDishId(Long dishId);

    List<DishesSteps> getSteps(Long id);

    List<DosageDto> getDosage(Long id);

    boolean addMaterial(DosageVo dosages);

    boolean deleteMaterial(Long dishId, Long materialId);

    boolean saveSteps(DishesSteps dishesSteps);

    boolean sortDishSteps(List<DishesSteps> dishesSteps);
}
